Skip to content

feat: initial slack-cli MVP - #1

Merged
herata merged 3 commits into
mainfrom
feature/initial-mvp
May 14, 2026
Merged

herata merged 3 commits into
mainfrom
feature/initial-mvp

Conversation

@herata

@herata herata commented May 14, 2026

Copy link
Copy Markdown
Owner

What

リポジトリ再作成に合わせて、3 つの作業ブランチ(実装 / README ポジショニング / CI 修正)を 1 つの commit にまとめて main へ初投入します。

  • develop : MVP 実装一式(11 phase)
  • feature/readme-positioning : README から jira-cli の参考由来表現を削除
  • fix/ci-bootstrap : CI ワークフローと dev tool 周りの修正

ファイル変更: 59 files / +12071 insertions(テスト fixture も含む)。

Why

旧リポジトリでは brainstorm → design → 11 phase 実装 → README 仕上げ → CI ブートストラップ の流れで commit を細かく積んだ結果、履歴がレビュー時に煩雑になっていたため、新リポジトリでは「ひとつの initial PR」として整理します。

How

主な要素:

アーキテクチャ

  • Rust 1.89 (MSRV) 単一クレート、#[tokio::main(flavor = \"current_thread\")]
  • reqwest + serde で Slack Web API を直叩き(SDK 非採用)
  • Result<T, CliError> 一本(anyhow 不使用)、exit code 9 種
  • tabled + serde + Display で出力レンダリング

コマンド

```
slack-cli auth init | whoami | list | logout
slack-cli channel list | view | create | archive | invite | leave
slack-cli message list | view | send | reply | update | delete | react
slack-cli search messages | files
slack-cli user list | view
slack-cli file list | upload | download
slack-cli completion
```

JSON envelope

```json
{
"ok": true,
"schema": "slack-cli/v0",
"data": { ... },
"request_id": "req_..."
}
```

セキュリティ

  • --token フラグは作らない(argv 露出回避)。SLACK_CLI_TOKEN env / --token-stdin のみ
  • HeaderValue::set_sensitive(true) を Authorization に必須
  • TokenStore: OS keychain (default) / file 0600 / env、Windows では file 無効化
  • release profile に panic = \"abort\"

テスト

  • 59 lib unit tests
  • 9 integration tests via wiremock + assert_cmd + insta

CI / Release

  • ubuntu/macos/windows マトリクス + msrv + linux-headless + cargo-deny
  • release タグで 6 ターゲット(linux-musl / macos / windows-msvc × x86_64/aarch64)バイナリ + SHA256 sums + git-cliff changelog
  • 全 action は SHA pin、Dependabot で自動更新

Testing

  • mise exec -- cargo test → 68 passed (59 lib + 9 integration)
  • mise exec -- cargo clippy --all-targets -- -D warnings → clean
  • mise exec -- cargo fmt --check → clean
  • mise exec -- cargo deny check advisories bans licenses sources → all ok

Checklist

  • Conventional Commits 規約
  • Self-review 済み
  • テスト・lint・format ローカル全 green
  • i18n: コード / log / エラー / --help はすべて英語
  • README.md(英語、primary)と README.ja.md(日本語)併設

補足

  • docs/superpowers/specs/... と docs/superpowers/plans/... は設計仕様書 / 実装プランの日本語ドキュメント。レビュー時に内部設計の参照に使えます。
  • mise.toml で rust default profile を指定(rustfmt / clippy 同梱)、cargo-nextest は CI で taiki-e/install-action 経由。
  • 旧リポジトリでの commit 履歴は破棄しました。差分は本 PR の diff で完結します。

🤖 Generated with Claude Code

Single-commit consolidation of three working branches that had grown
out of the original repository's brainstorm → design → implementation
→ readme polish → CI bootstrap sequence:

  - develop                        full MVP implementation
  - feature/readme-positioning     drop jira-cli influence framing
  - fix/ci-bootstrap               CI workflow + dev-tool fixes

Highlights:

* Rust 1.89 (MSRV) single-crate CLI, tokio current_thread, reqwest
  direct calls to Slack Web API (no SDK).
* `noun → verb` command tree: auth / channel / message / search /
  user / file / completion.
* Stable JSON envelope `slack-cli/v0` with `--dry-run` payload,
  structured `Hint` for agents, and exit-code map.
* TokenStore: OS keychain (default), file (0600 on unix), or env;
  Windows disables the file backend.
* Resolver with 60s in-process cache and ambiguity detection
  (channel + user).
* 3-layer test pyramid: 59 lib unit tests, 9 integration tests via
  wiremock + assert_cmd + insta.
* CI matrix: ubuntu/macos/windows + msrv + linux-headless + deny;
  release.yml builds 6 targets (linux-musl/macos/windows-msvc ×
  x86_64/aarch64) with SHA256 sums and git-cliff changelog.
* Dev tooling pinned via mise (rust default profile + ubi for
  cargo-insta/cargo-deny/git-cliff; cargo-nextest installed in CI
  via taiki-e/install-action).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented May 14, 2026 •

Copy link
Copy Markdown

Warning

Rate limit exceeded

@herata has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 11 minutes and 57 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 10f0a828-217f-4723-8c32-be01cbf84135

📥 Commits

Reviewing files that changed from the base of the PR and between 9d1d9e6 and db6ec67.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (58)
  • .github/dependabot.yml
  • .github/workflows/ci.yml
  • .github/workflows/release.yml
  • .gitignore
  • Cargo.toml
  • README.ja.md
  • README.md
  • cliff.toml
  • deny.toml
  • docs/superpowers/plans/2026-05-14-slack-cli-mvp.md
  • docs/superpowers/specs/2026-05-14-slack-cli-design.md
  • mise.toml
  • src/cli.rs
  • src/cmd/auth.rs
  • src/cmd/channel.rs
  • src/cmd/completion.rs
  • src/cmd/file.rs
  • src/cmd/message.rs
  • src/cmd/mod.rs
  • src/cmd/search.rs
  • src/cmd/user.rs
  • src/config.rs
  • src/error.rs
  • src/id.rs
  • src/lib.rs
  • src/logging.rs
  • src/main.rs
  • src/output.rs
  • src/resolve.rs
  • src/secret.rs
  • src/slack.rs
  • tests/auth.rs
  • tests/channel.rs
  • tests/common/mod.rs
  • tests/file.rs
  • tests/fixtures/chat.delete.ok.json
  • tests/fixtures/chat.postMessage.ok.json
  • tests/fixtures/chat.update.ok.json
  • tests/fixtures/conversations.archive.ok.json
  • tests/fixtures/conversations.create.ok.json
  • tests/fixtures/conversations.history.ok.json
  • tests/fixtures/conversations.info.ok.json
  • tests/fixtures/conversations.invite.ok.json
  • tests/fixtures/conversations.leave.ok.json
  • tests/fixtures/conversations.list.ok.json
  • tests/fixtures/conversations.replies.ok.json
  • tests/fixtures/files.info.ok.json
  • tests/fixtures/files.list.ok.json
  • tests/fixtures/files.upload.ok.json
  • tests/fixtures/reactions.add.already_reacted.json
  • tests/fixtures/reactions.add.ok.json
  • tests/fixtures/search.files.ok.json
  • tests/fixtures/search.messages.ok.json
  • tests/fixtures/users.info.ok.json
  • tests/fixtures/users.list.ok.json
  • tests/message.rs
  • tests/search.rs
  • tests/user.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/initial-mvp

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

herata and others added 2 commits May 14, 2026 17:18
Three remaining CI failures on the initial PR:

1. ubuntu test failed building libdbus-sys (transitive of keyring) —
   the test job had no libdbus install step. Add it (ubuntu-only).
2. macos test failed because mise's ubi backend hit anonymous GitHub
   API rate limits (403) when resolving cargo-deny / insta / git-cliff
   release lists. Wire `GITHUB_TOKEN` env into both mise-action steps
   so requests are authenticated.
3. windows test failed with `function ws is never used`: the file
   backend test (which is the only consumer of the `ws()` helper) is
   already #[cfg(not(target_os = "windows"))]. Gate the helper the
   same way.

Local: cargo test/clippy/fmt all clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…port

- ubuntu: `cargo fmt --check` still failed because mise's rust backend
  cached a minimal toolchain from the previous run; the
  `profile = "default"` request in mise.toml does not retroactively
  add components. Run `rustup component add rustfmt clippy` in CI so
  the components are present regardless of cache state.
- windows: `use crate::config::{TokenSource, WorkspaceConfig, WorkspaceMeta}`
  in `src/secret.rs::tests` was unused once `ws()` got cfg-gated.
  Gate the import with the same `#[cfg(not(target_os = "windows"))]`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@herata
herata merged commit 1ec8118 into main May 14, 2026
7 checks passed
@herata
herata deleted the feature/initial-mvp branch May 14, 2026 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant