cardinal-ai 0.2.10 → 0.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +15 -0
- data/exe/cardinal +20 -2
- data/lib/cardinal/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d84dde8c38e1b5d9819430f36789358dcccd571d7889c36555156a8fbf882172
|
|
4
|
+
data.tar.gz: 69720ca8ec6c5ad490d863d9fabe4636ef67f465fa028fe2d27c2949ed9ccb86
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e3d7f706dbab0ec9b06a22ee2fa547ded9690b45b2faeb0e3582b78dc893ba7599ae9c5ada2fd5e9e6b88b11f1445dbc2528c76fd4cbe2879e413761af8a82b7
|
|
7
|
+
data.tar.gz: 722fd734f542aed1c45af13226a8d233af66b0dc47e719f3b5efc85b02b0917e80e7bbb5239399bc326b814877d7af044ec3b3af8214e780b59f6a15503e119f
|
data/README.md
CHANGED
|
@@ -20,6 +20,18 @@ merged. You never leave the board.
|
|
|
20
20
|
gem install cardinal-ai
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
+
**If `cardinal` says "command not found" afterwards:** on many systems (Arch, Fedora,
|
|
24
|
+
any install without sudo) gems land in a per-user folder your shell doesn't look in —
|
|
25
|
+
the install output even warns about it, easy to miss. Add it to your PATH once:
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
# bash / zsh — add to ~/.bashrc or ~/.zshrc:
|
|
29
|
+
export PATH="$(ruby -e 'puts Gem.user_dir')/bin:$PATH"
|
|
30
|
+
|
|
31
|
+
# fish — run once, it sticks:
|
|
32
|
+
fish_add_path (ruby -e 'puts Gem.user_dir')/bin
|
|
33
|
+
```
|
|
34
|
+
|
|
23
35
|
## Use it
|
|
24
36
|
|
|
25
37
|
Go to any project and start Cardinal (a brand-new folder is fine — it offers to
|
|
@@ -33,6 +45,9 @@ cardinal
|
|
|
33
45
|
The first time, a browser window asks **which Claude account this board should work as** —
|
|
34
46
|
pick one, and it's remembered for this project only. Then open **http://localhost:4000**.
|
|
35
47
|
|
|
48
|
+
Running boards on two projects at once? Give the second one its own port:
|
|
49
|
+
`cardinal 4001` (or `-p 4001`).
|
|
50
|
+
|
|
36
51
|
That's the whole setup. Now:
|
|
37
52
|
|
|
38
53
|
1. **Add a card** for something you want done, in plain English.
|
data/exe/cardinal
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
# cardinal — spin up a Cardinal AI board for the repo you're standing in.
|
|
5
5
|
#
|
|
6
6
|
# cardinal # or `cardinal up` — first run links a Claude account
|
|
7
|
+
# cardinal 4001 # same, on a different port (also: -p/--port 4001)
|
|
7
8
|
# cardinal login # redo the account link (switch accounts)
|
|
8
9
|
# cardinal logout # unlink this instance's account
|
|
9
10
|
#
|
|
@@ -22,7 +23,24 @@ TOKEN_FILE = File.join(AUTH_DIR, "oauth-token")
|
|
|
22
23
|
def say(msg) = puts("cardinal ▸ #{msg}")
|
|
23
24
|
def die(msg) = abort("cardinal: #{msg}")
|
|
24
25
|
|
|
25
|
-
|
|
26
|
+
# Port: `cardinal 4001`, `-p 4001`, `--port 4001`, or `--port=4001`.
|
|
27
|
+
# Explicit choice beats the PORT env var; default (4000) is applied later.
|
|
28
|
+
args = ARGV.dup
|
|
29
|
+
port = nil
|
|
30
|
+
if (i = args.index("-p") || args.index("--port"))
|
|
31
|
+
args.delete_at(i)
|
|
32
|
+
port = args.delete_at(i) or die("#{ARGV[i]} needs a port number")
|
|
33
|
+
elsif (flag = args.find { |a| a.start_with?("--port=") })
|
|
34
|
+
args.delete(flag)
|
|
35
|
+
port = flag.split("=", 2).last
|
|
36
|
+
elsif (bare = args.find { |a| a.match?(/\A\d+\z/) })
|
|
37
|
+
args.delete(bare)
|
|
38
|
+
port = bare
|
|
39
|
+
end
|
|
40
|
+
die "invalid port: #{port}" if port && !port.match?(/\A\d+\z/)
|
|
41
|
+
ENV["PORT"] = port if port
|
|
42
|
+
|
|
43
|
+
cmd = args[0] || "up"
|
|
26
44
|
unless File.directory?(File.join(TARGET, ".git"))
|
|
27
45
|
# A brand-new project shouldn't need ceremony — cards are branches and PRs,
|
|
28
46
|
# so a repo must exist, but Cardinal can lay that rail itself.
|
|
@@ -47,7 +65,7 @@ when "login"
|
|
|
47
65
|
FileUtils.rm_f(TOKEN_FILE)
|
|
48
66
|
when "up" # continue
|
|
49
67
|
else
|
|
50
|
-
die "usage: cardinal [up|login|logout]"
|
|
68
|
+
die "usage: cardinal [up|login|logout] [-p PORT]"
|
|
51
69
|
end
|
|
52
70
|
|
|
53
71
|
# Hide .cardinal/ from the host repo without touching its .gitignore.
|
data/lib/cardinal/version.rb
CHANGED