Skip to content

CorvidLabs/fledge-plugin-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

fledge-plugin-example

A minimal "hello world" plugin for fledge that demonstrates both a command extension and a lifecycle hook.

Install

fledge plugin install CorvidLabs/fledge-plugin-example

Usage

fledge hello          # prints: Hello, world!
fledge hello Alice    # prints: Hello, Alice!

plugin.toml format

Every fledge plugin requires a plugin.toml manifest at the repository root:

[plugin]
name = "fledge-plugin-example"
version = "0.1.0"
description = "Short description shown in fledge plugin search"
author = "your-name"

# Commands register new subcommands under `fledge <name>`
[[commands]]
name = "hello"
description = "Print a friendly greeting"
binary = "bin/fledge-hello"   # path to executable, relative to repo root

# Hooks run shell scripts at plugin lifecycle events
[hooks]
post_install = "hooks/post-install.sh"   # runs after `fledge plugin install`
post_remove  = "hooks/post-remove.sh"    # runs after `fledge plugin remove`

Fields

Field Required Description
plugin.name yes Plugin identifier (conventionally fledge-<name>)
plugin.version yes SemVer version string
plugin.description no One-line description shown in search results
plugin.author no Author name or GitHub username
commands[].name yes Subcommand name — invoked as fledge <name>
commands[].description no Description shown in help output
commands[].binary yes Relative path to the executable within the repo
hooks.post_install no Script to run after install
hooks.post_remove no Script to run after remove

Discovery

Plugins tagged with the fledge-plugin GitHub topic appear in fledge plugin search:

fledge plugin search hello

To make your plugin discoverable, add the fledge-plugin topic to your repository.

Repository layout

fledge-plugin-example/
├── plugin.toml          # manifest (required)
├── bin/
│   └── fledge-hello     # command executable (must be executable)
└── hooks/
    ├── post-install.sh  # lifecycle hook
    └── post-remove.sh   # lifecycle hook

How installation works

fledge plugin install CorvidLabs/fledge-plugin-example:

  1. Clones the repo to ~/.config/fledge/plugins/fledge-plugin-example/
  2. Reads plugin.toml
  3. Makes each binary executable
  4. Symlinks binaries to ~/.config/fledge/plugins/bin/fledge-<name>
  5. Runs hooks.post_install if defined
  6. Records the plugin in ~/.config/fledge/plugins.toml

License

MIT

About

Example fledge plugin demonstrating command extension and lifecycle hooks

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages