Skip to content

docs: add SDK/CLI quickstart smoke path#236

Open
Gradata wants to merge 1 commit into
mainfrom
docs/gra-1781-quickstart-smoke
Open

docs: add SDK/CLI quickstart smoke path#236
Gradata wants to merge 1 commit into
mainfrom
docs/gra-1781-quickstart-smoke

Conversation

@Gradata
Copy link
Copy Markdown
Owner

@Gradata Gradata commented May 29, 2026

Summary

  • adds examples/offline_quickstart_smoke.py to verify the public SDK/CLI quickstart without network credentials or real agent-config mutation
  • fixes README quickstart to pass --brain-dir ./my-brain to audit
  • updates install docs with the agent attach step and docs-ready smoke command
  • replaces active “Claude Code plugin” wording in examples with SDK/CLI hook/integration language

Verification

  • PYTHONPATH=src python3 examples/offline_quickstart_smoke.py → passed, including init, install --agent claude-code --dry-run, correction, recall, stats, audit
  • python3 -m py_compile examples/offline_quickstart_smoke.py
  • PYTHONPATH=src python3 -m pytest -q tests/test_cli.py tests/test_cli_install_agent.py → 29 passed, 2 warnings

Paperclip: GRA-1781

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 29, 2026

Review Change Stack

📝 Walkthrough
  • Added examples/offline_quickstart_smoke.py — new smoke test script that verifies the SDK/CLI quickstart flow offline (init, install with --dry-run, correct, recall, stats, audit) without network credentials
  • Updated README quickstart to pass --brain-dir ./my-brain flag to audit command
  • Enhanced docs/getting-started/install.md with new "Attach an agent" section documenting gradata install --agent for connecting brains to agents (claude-code, codex, gemini, cursor, hermes, opencode, all)
  • Updated verification instructions to use brain-scoped commands with --brain-dir flag and added offline smoke test example
  • Replaced "Claude Code plugin" terminology with SDK/CLI hook/integration language throughout examples
  • Updated examples/README.md documentation link for with_claude_code.py example

Walkthrough

This PR adds an offline smoke-test script to verify the Gradata onboarding flow without cloud credentials, and updates installation documentation to reference the script and include brain-scoped CLI verification commands.

Changes

Offline Smoke Test Documentation and Implementation

Layer / File(s) Summary
Offline smoke test script implementation
Gradata/examples/offline_quickstart_smoke.py
New Python module implementing run() and main() functions that execute a sequence of CLI commands (--help, init, install --dry-run, correct, recall, stats, audit) with isolated environment variables and temporary workspace, then verify the database file exists.
Documentation updates referencing offline smoke test
Gradata/README.md, Gradata/docs/getting-started/install.md, Gradata/examples/README.md
Updated Quickstart section to include --brain-dir flag in audit command; added "Attach an agent" section documenting supported targets; expanded "Verify" instructions with brain-scoped commands and offline smoke test invocation; updated example documentation links.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

docs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly summarizes the main change: adding a quickstart smoke test path for SDK/CLI verification, which is the primary focus across the documentation and example files added in this changeset.
Description check ✅ Passed The PR description is directly related to the changeset, covering all major changes including the new smoke test script, README updates, install docs improvements, and example wording changes, with relevant verification details.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/gra-1781-quickstart-smoke

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 OpenGrep (1.22.0)

OpenGrep fatal error (exit code 2):
┌──────────────┐
│ Opengrep CLI │
└──────────────┘

�[32m✔�[39m �[1mOpengrep OSS�[0m
�[32m✔�[39m Basic security coverage for first-party code vulnerabilities.

�[1m Loading rules from local config...�[0m
[00.22][ERROR]: Error: exception Glob.Lexer.Syntax_error("malformed glob pattern: missing ']'")
Raised at Glob__Lexer.syntax_error in file "libs/glob/Lexer.mll", line 8, characters 2-26
Called from Glob__Lexer.__ocaml_lex_token_rec in file "libs/glob/Lexer.mll", line 29, characters 26-53
Cal


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

@coderabbitai coderabbitai Bot added the docs label May 29, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Gradata/examples/offline_quickstart_smoke.py`:
- Line 49: The call to run(...) passes both "--brain-dir" and the redundant
"--brain" flag with the same value; update the invocation in
offline_quickstart_smoke.py by removing the "--brain", str(brain) argument so
the command only uses "--brain-dir" (reference the run([...]) call shown in the
diff).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: eec25b8b-9ec5-43a1-b05b-1577e661b60e

📥 Commits

Reviewing files that changed from the base of the PR and between a197bff and 4a235b1.

📒 Files selected for processing (4)
  • Gradata/README.md
  • Gradata/docs/getting-started/install.md
  • Gradata/examples/README.md
  • Gradata/examples/offline_quickstart_smoke.py
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: pytest macos-latest / py3.12
  • GitHub Check: pytest windows-latest / py3.12
  • GitHub Check: pytest ubuntu-latest / py3.12
  • GitHub Check: pytest (py3.12)
  • GitHub Check: pytest ubuntu-latest / py3.11
  • GitHub Check: pytest macos-latest / py3.11
  • GitHub Check: pytest (py3.11)
  • GitHub Check: pytest windows-latest / py3.11
🔇 Additional comments (10)
Gradata/examples/offline_quickstart_smoke.py (4)

1-16: LGTM!


18-32: LGTM!


35-46: LGTM!


63-71: LGTM!

Gradata/README.md (2)

106-106: LGTM!


127-132: LGTM!

Gradata/docs/getting-started/install.md (2)

96-105: LGTM!


110-121: LGTM!

Gradata/examples/README.md (2)

28-29: LGTM!


37-37: LGTM!


run(["--help"], env=env)
run(["init", str(brain), "--domain", "Smoke", "--name", "Quickstart Smoke", "--no-interactive"], env=env)
run(["--brain-dir", str(brain), "install", "--agent", "claude-code", "--brain", str(brain), "--dry-run"], env=env)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Remove redundant --brain flag.

The install command includes both --brain-dir and --brain with identical values. Based on the documentation updates in this PR (README.md line 106, install.md lines 110-113), only --brain-dir is used. The --brain flag appears redundant here.

🔧 Proposed fix
-        run(["--brain-dir", str(brain), "install", "--agent", "claude-code", "--brain", str(brain), "--dry-run"], env=env)
+        run(["--brain-dir", str(brain), "install", "--agent", "claude-code", "--dry-run"], env=env)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
run(["--brain-dir", str(brain), "install", "--agent", "claude-code", "--brain", str(brain), "--dry-run"], env=env)
run(["--brain-dir", str(brain), "install", "--agent", "claude-code", "--dry-run"], env=env)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Gradata/examples/offline_quickstart_smoke.py` at line 49, The call to
run(...) passes both "--brain-dir" and the redundant "--brain" flag with the
same value; update the invocation in offline_quickstart_smoke.py by removing the
"--brain", str(brain) argument so the command only uses "--brain-dir" (reference
the run([...]) call shown in the diff).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant