Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Dec 10, 2024
1 parent b606294 commit 307c747
Show file tree
Hide file tree
Showing 11 changed files with 127 additions and 49 deletions.
6 changes: 0 additions & 6 deletions docs/cli/add.md

This file was deleted.

111 changes: 83 additions & 28 deletions docs/cli/commands.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,36 @@
"hidden_aliases": [],
"examples": []
},
"add": {
"cd": {
"full_cmd": [
"add"
"cd"
],
"usage": "add",
"usage": "cd <--shell-pid <SHELL_PID>>",
"subcommands": {},
"args": [],
"flags": [],
"mounts": [],
"hide": false,
"help": "Add a new daemon to pitchfork.toml",
"name": "add",
"aliases": [
"a"
"flags": [
{
"name": "shell-pid",
"usage": "--shell-pid <SHELL_PID>",
"short": [],
"long": [
"shell-pid"
],
"required": true,
"hide": false,
"global": false,
"arg": {
"name": "SHELL_PID",
"usage": "<SHELL_PID>",
"required": true,
"hide": false
}
}
],
"mounts": [],
"hide": true,
"name": "cd",
"aliases": [],
"hidden_aliases": [],
"examples": []
},
Expand All @@ -67,6 +82,62 @@
"hidden_aliases": [],
"examples": []
},
"config": {
"full_cmd": [
"config"
],
"usage": "config <SUBCOMMAND>",
"subcommands": {
"add": {
"full_cmd": [
"config",
"add"
],
"usage": "config add",
"subcommands": {},
"args": [],
"flags": [],
"mounts": [],
"hide": false,
"help": "Add a new daemon to pitchfork.toml",
"name": "add",
"aliases": [
"a"
],
"hidden_aliases": [],
"examples": []
},
"remove": {
"full_cmd": [
"config",
"remove"
],
"usage": "config remove",
"subcommands": {},
"args": [],
"flags": [],
"mounts": [],
"hide": false,
"help": "Remove a daemon from pitchfork.toml",
"name": "remove",
"aliases": [
"rm"
],
"hidden_aliases": [],
"examples": []
}
},
"args": [],
"flags": [],
"mounts": [],
"hide": false,
"subcommand_required": true,
"help": "manage/edit pitchfork.toml files",
"name": "config",
"aliases": [],
"hidden_aliases": [],
"examples": []
},
"completion": {
"full_cmd": [
"completion"
Expand All @@ -86,6 +157,7 @@
"flags": [],
"mounts": [],
"hide": false,
"help": "Generates shell completion scripts",
"name": "completion",
"aliases": [],
"hidden_aliases": [],
Expand Down Expand Up @@ -207,24 +279,6 @@
"hidden_aliases": [],
"examples": []
},
"remove": {
"full_cmd": [
"remove"
],
"usage": "remove",
"subcommands": {},
"args": [],
"flags": [],
"mounts": [],
"hide": false,
"help": "Remove a daemon from pitchfork.toml",
"name": "remove",
"aliases": [
"rm"
],
"hidden_aliases": [],
"examples": []
},
"run": {
"full_cmd": [
"run"
Expand Down Expand Up @@ -446,6 +500,7 @@
"mounts": [],
"hide": false,
"subcommand_required": true,
"help": "Start, stop, and check the status of the pitchfork supervisor daemon",
"name": "supervisor",
"aliases": [],
"hidden_aliases": [],
Expand Down
2 changes: 2 additions & 0 deletions docs/cli/completion.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

- **Usage**: `pitchfork completion <SHELL>`

Generates shell completion scripts

## Arguments

### `<SHELL>`
Expand Down
10 changes: 10 additions & 0 deletions docs/cli/config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# `pitchfork config`

- **Usage**: `pitchfork config <SUBCOMMAND>`

manage/edit pitchfork.toml files

## Subcommands

- [`pitchfork config add`](/cli/config/add.md)
- [`pitchfork config remove`](/cli/config/remove.md)
6 changes: 6 additions & 0 deletions docs/cli/config/add.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# `pitchfork config add`

- **Usage**: `pitchfork config add`
- **Aliases**: `a`

Add a new daemon to pitchfork.toml
6 changes: 6 additions & 0 deletions docs/cli/config/remove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# `pitchfork config remove`

- **Usage**: `pitchfork config remove`
- **Aliases**: `rm`

Remove a daemon from pitchfork.toml
5 changes: 3 additions & 2 deletions docs/cli/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@
## Subcommands

- [`pitchfork activate <SHELL>`](/cli/activate.md)
- [`pitchfork add`](/cli/add.md)
- [`pitchfork clean`](/cli/clean.md)
- [`pitchfork config <SUBCOMMAND>`](/cli/config.md)
- [`pitchfork config add`](/cli/config/add.md)
- [`pitchfork config remove`](/cli/config/remove.md)
- [`pitchfork completion <SHELL>`](/cli/completion.md)
- [`pitchfork disable`](/cli/disable.md)
- [`pitchfork enable`](/cli/enable.md)
- [`pitchfork list`](/cli/list.md)
- [`pitchfork logs [-n <N>] [-t --tail] [NAME]...`](/cli/logs.md)
- [`pitchfork remove`](/cli/remove.md)
- [`pitchfork run [-f --force] <NAME> [CMD]...`](/cli/run.md)
- [`pitchfork start [NAME]...`](/cli/start.md)
- [`pitchfork status`](/cli/status.md)
Expand Down
6 changes: 0 additions & 6 deletions docs/cli/remove.md

This file was deleted.

2 changes: 2 additions & 0 deletions docs/cli/supervisor.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

- **Usage**: `pitchfork supervisor <SUBCOMMAND>`

Start, stop, and check the status of the pitchfork supervisor daemon

## Subcommands

- [`pitchfork supervisor run [-f --force]`](/cli/supervisor/run.md)
Expand Down
1 change: 1 addition & 0 deletions mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ run = [
bun = "latest"

[tasks.pre-commit]
depends = ["render", "lint-fix"]
run = [
"cargo fmt -- $(git diff --name-only --cached | grep '\\.rs$')",
"git -c advice.addEmptyPathspec=false add $(git diff --name-only --cached | grep '\\.rs$')",
Expand Down
21 changes: 14 additions & 7 deletions pitchfork.usage.kdl
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,23 @@ cmd "activate" help="Activate pitchfork in your shell session" {
Necessary for autostart/stop when entering/exiting projects with pitchfork.toml files"
arg "<SHELL>" help="The shell to generate source for"
}
cmd "add" help="Add a new daemon to pitchfork.toml" {
alias "a"
cmd "cd" hide=true {
flag "--shell-pid" required=true {
arg "<SHELL_PID>"
}
}
cmd "clean" help="Removes stopped/failed daemons from `pitchfork list`" {
alias "c"
}
cmd "completion" {
cmd "config" subcommand_required=true help="manage/edit pitchfork.toml files" {
cmd "add" help="Add a new daemon to pitchfork.toml" {
alias "a"
}
cmd "remove" help="Remove a daemon from pitchfork.toml" {
alias "rm"
}
}
cmd "completion" help="Generates shell completion scripts" {
arg "<SHELL>" help="The shell to generate completion for"
}
cmd "disable" help="Prevent a daemon from restarting" {
Expand All @@ -34,9 +44,6 @@ cmd "logs" help="Displays logs for daemon(s)" {
flag "-t --tail" help="Show logs in real-time"
arg "[NAME]..." help="Show only logs for the specified daemon(s)" var=true
}
cmd "remove" help="Remove a daemon from pitchfork.toml" {
alias "rm"
}
cmd "run" help="Runs a one-off daemon" {
alias "r"
flag "-f --force"
Expand All @@ -53,7 +60,7 @@ cmd "status" help="Display the status of a daemons" {
cmd "stop" help="Kill a running daemon" {
alias "kill"
}
cmd "supervisor" subcommand_required=true {
cmd "supervisor" subcommand_required=true help="Start, stop, and check the status of the pitchfork supervisor daemon" {
cmd "run" help="Runs the internal pitchfork daemon in the foreground" {
flag "-f --force" help="kill existing daemon"
}
Expand Down

0 comments on commit 307c747

Please sign in to comment.