Skip to content

Commit 60e402c

Browse files
sweetmantechclaude
andauthored
docs: add README with quickstart guide for npm landing page (#2)
Also skip publish in CI when version already exists on npm. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent fcc259c commit 60e402c

3 files changed

Lines changed: 91 additions & 1 deletion

File tree

.github/workflows/publish.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,18 @@ jobs:
3131

3232
- run: pnpm build
3333

34+
- name: Check if version already published
35+
id: version-check
36+
run: |
37+
LOCAL_VERSION=$(node -p "require('./package.json').version")
38+
if npm view @recoupable/cli@$LOCAL_VERSION version 2>/dev/null; then
39+
echo "published=true" >> $GITHUB_OUTPUT
40+
else
41+
echo "published=false" >> $GITHUB_OUTPUT
42+
fi
43+
3444
- name: Publish to npm
45+
if: steps.version-check.outputs.published == 'false'
3546
run: pnpm publish --no-git-checks
3647
env:
3748
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

README.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# @recoupable/cli
2+
3+
Command-line interface for the [Recoup](https://recoupable.com) platform.
4+
5+
## Quick Start
6+
7+
### Install
8+
9+
```bash
10+
npm install -g @recoupable/cli
11+
```
12+
13+
### Authenticate
14+
15+
Set your API key as an environment variable:
16+
17+
```bash
18+
export RECOUP_API_KEY=your-api-key
19+
```
20+
21+
### Verify
22+
23+
```bash
24+
recoup whoami
25+
```
26+
27+
## Commands
28+
29+
### Account
30+
31+
```bash
32+
recoup whoami # Show your account ID
33+
recoup whoami --json # Output as JSON
34+
```
35+
36+
### Artists
37+
38+
```bash
39+
recoup artists list # List your artists
40+
recoup artists list --json
41+
```
42+
43+
### Chats
44+
45+
```bash
46+
recoup chats list # List your chats
47+
recoup chats create --name "Topic" # Create a new chat
48+
recoup chats create --artist <id> # Create a chat with an artist
49+
```
50+
51+
### Sandboxes
52+
53+
```bash
54+
recoup sandboxes list # List your sandboxes
55+
recoup sandboxes create # Create a new sandbox
56+
recoup sandboxes create --command "ls -la" # Create and run a command
57+
```
58+
59+
### Organizations
60+
61+
```bash
62+
recoup orgs list # List your organizations
63+
```
64+
65+
### Global Flags
66+
67+
All commands support `--json` for machine-readable JSON output.
68+
69+
## Configuration
70+
71+
| Variable | Required | Description |
72+
|----------|----------|-------------|
73+
| `RECOUP_API_KEY` | Yes | Your Recoup API key |
74+
| `RECOUP_API_URL` | No | API base URL (default: `https://recoup-api.vercel.app`) |
75+
76+
## License
77+
78+
MIT

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"recoup": "./dist/bin.cjs"
88
},
99
"files": [
10-
"dist"
10+
"dist",
11+
"README.md"
1112
],
1213
"scripts": {
1314
"build": "tsup",

0 commit comments

Comments
 (0)