|
1
|
# sigit-si-cli |
|
2
|
|
|
3
|
`si` is the command line interface for [sigit.si](https://sigit.si) — sign in, |
|
4
|
manage repositories, review pull requests, triage issues, search code, and |
|
5
|
drive Cloud Sessions, all from the terminal. It's the `gh` of sigit.si. |
|
6
|
|
|
7
|
## Install |
|
8
|
|
|
9
|
```sh |
|
10
|
cargo install --path crates/cli |
|
11
|
``` |
|
12
|
|
|
13
|
This installs a binary named `si`. |
|
14
|
|
|
15
|
## Usage |
|
16
|
|
|
17
|
```sh |
|
18
|
si auth login # sign in with your sigit.si account |
|
19
|
si repo list # your repositories |
|
20
|
si repo create my-project --private |
|
21
|
si repo clone seto/my-project # clone with your sign-in, no token in the URL |
|
22
|
si auth setup-git # or let plain `git clone` use it too |
|
23
|
|
|
24
|
# Inside a repo checkout, si infers OWNER/NAME from the sigit.si git remote — |
|
25
|
# --repo is only needed when you're not standing in one. |
|
26
|
si pr list |
|
27
|
si pr view 42 |
|
28
|
si pr create --title "Fix the thing" --base main |
|
29
|
|
|
30
|
si issue list --state open |
|
31
|
si issue create --title "Bug: ..." --body "Steps to reproduce..." |
|
32
|
|
|
33
|
si code search "TODO" --ref main |
|
34
|
si code view README.md |
|
35
|
|
|
36
|
si status set HEAD --state success --context ci/test |
|
37
|
si status view # the checks on HEAD |
|
38
|
|
|
39
|
si run start --repo seto/app "Fix the failing build" |
|
40
|
si run list |
|
41
|
si run view 12 # status and the end of the transcript |
|
42
|
|
|
43
|
si site publish --wait # publish the default branch as a site |
|
44
|
si site view |
|
45
|
|
|
46
|
si session new --title "Refactor auth" |
|
47
|
si models |
|
48
|
si billing show |
|
49
|
|
|
50
|
si auth signup # also: resend, reset-password, delete-account |
|
51
|
|
|
52
|
si browse # open the current repo on sigit.si |
|
53
|
si api repos # raw escape hatch for any endpoint |
|
54
|
``` |
|
55
|
|
|
56
|
Pass `--json` to any read command for machine-readable output. |
|
57
|
|
|
58
|
### As an MCP server |
|
59
|
|
|
60
|
<!-- mcp-name: si.sigit/cli --> |
|
61
|
|
|
62
|
`si mcp` serves these same commands to an AI agent as |
|
63
|
[MCP](https://modelcontextprotocol.io) tools over stdio: |
|
64
|
|
|
65
|
```jsonc |
|
66
|
{ |
|
67
|
"mcpServers": { |
|
68
|
"sigit": { "command": "si", "args": ["mcp"] } |
|
69
|
} |
|
70
|
} |
|
71
|
``` |
|
72
|
|
|
73
|
There is nothing to authenticate — the server reuses the token `si auth login` |
|
74
|
stored. Point your editor at the directory of a checkout and repository tools |
|
75
|
default to the repo you're standing in, so the agent can say "list the open |
|
76
|
pull requests" without naming one; `create_pull_request` likewise defaults its |
|
77
|
head to the checked-out branch. |
|
78
|
|
|
79
|
Trim the tool list when an agent doesn't need all of it: |
|
80
|
|
|
81
|
```sh |
|
82
|
si mcp --read-only # drop every tool that writes |
|
83
|
si mcp --toolsets repo,issue,pr,code # or SIGIT_TOOLSETS=repo,issue |
|
84
|
``` |
|
85
|
|
|
86
|
Toolsets are `account`, `repo`, `issue`, `pr`, `code`, `hook`, `session`, and |
|
87
|
`billing`. sigit.si also hosts a remote MCP server at `/api/v1/mcp` for clients |
|
88
|
that would rather connect over HTTP than spawn a binary. |
|
89
|
|
|
90
|
### Environments |
|
91
|
|
|
92
|
```sh |
|
93
|
si --environment dev repo list # a local sigit.si server (localhost:3000) |
|
94
|
SIGIT_HOST=staging.example.com si repo list |
|
95
|
``` |
|
96
|
|
|
97
|
Credentials are stored per-environment in `~/.sigit/token` (or |
|
98
|
`~/.sigit-dev/token`). `SIGIT_TOKEN` overrides the stored token, which is how |
|
99
|
CI authenticates without an interactive login. |
|
100
|
|
|
101
|
## Workspace layout |
|
102
|
|
|
103
|
- **`crates/sigit-si-api`** — a standalone, typed Rust client for the sigit.si |
|
104
|
JSON API. No CLI dependencies (clap, dialoguer, …); usable from any Rust |
|
105
|
project that wants to talk to sigit.si. |
|
106
|
- **`crates/cli`** — the `si` binary: command parsing, terminal rendering, git |
|
107
|
remote resolution, and credential storage, built on top of `sigit-si-api`. |
|
108
|
|
|
109
|
Issues, pull requests, and code search have no REST surface on sigit.si yet — |
|
110
|
they're served over the same MCP (Model Context Protocol) JSON-RPC endpoint |
|
111
|
the AI agent uses. `sigit-si-api` speaks that transport internally; it's not |
|
112
|
visible at the call site. |
|
113
|
|
|
114
|
## MCP Registry listings |
|
115
|
|
|
116
|
This repo publishes two entries to the |
|
117
|
[official MCP Registry](https://registry.modelcontextprotocol.io), one per way |
|
118
|
of reaching the same tools, so registry-aware clients can add either in one |
|
119
|
click: |
|
120
|
|
|
121
|
| Listing | File | What it is | |
|
122
|
| --- | --- | --- | |
|
123
|
| `si.sigit/cli` | `server.json` | This CLI: a cargo package listing that runs `si mcp` over stdio. | |
|
124
|
| `si.sigit/sigit` | `server-sigit.json` | The hosted server at `sigit.si/api/v1/mcp`, a remote Streamable-HTTP listing. The endpoint `sigit-si-api` talks to, and the official server siGit Code bakes in. | |
|
125
|
|
|
126
|
The CLI holds `server.json` because it's what this repo ships, and that's the |
|
127
|
filename `mcp-publisher` defaults to. Sibling listings are named after their |
|
128
|
own leaf, so the file says which entry it publishes. |
|
129
|
|
|
130
|
Both go out through the `release-mcp-registry.yml` workflow, and both prove |
|
131
|
namespace ownership with a DNS TXT record on `sigit.si` rather than GitHub |
|
132
|
OIDC, so one credential covers the pair. A package listing has a second hurdle: |
|
133
|
the registry fetches the crate from crates.io and looks for the |
|
134
|
`mcp-name: si.sigit/cli` marker in its README, which is why that marker sits in |
|
135
|
this file. Crate versions are immutable, so a release that ships without the |
|
136
|
marker can never be listed, and fixing it costs a new version. The internal |
|
137
|
setup and release runbook live with the server (private `sigit-si` repo). |
|
138
|
|
|
139
|
## Development |
|
140
|
|
|
141
|
```sh |
|
142
|
make build # cargo build --workspace |
|
143
|
make test # cargo test --workspace |
|
144
|
make lint # cargo clippy --workspace --all-targets -- -D warnings |
|
145
|
make fmt # cargo fmt --all |
|
146
|
make check # fmt + lint + test |
|
147
|
``` |
|
148
|
|
|
149
|
## Disclaimer |
|
150
|
|
|
151
|
All em dashes are written by Seto Elkahfi. |
|
152
|
|
|
153
|
## License |
|
154
|
|
|
155
|
Apache-2.0 |