Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/LiberBinjio/claude-cli-rs
/ functions
Functions
1,121 in github.com/LiberBinjio/claude-cli-rs
⨍
Functions
1,121
◇
Types & classes
139
↓ 107 callers
Method
push
Append a fully-formed message. Auto-scrolls to bottom when enabled.
crates/tui/src/message_view.rs:69
↓ 54 callers
Method
len
(&self)
crates/query/src/tool_set.rs:58
↓ 53 callers
Method
handle_key
Process a key event. Returns `true` when the user pressed Enter (without Shift) — i.e. the input should be submitted.
crates/tui/src/prompt_input.rs:86
↓ 50 callers
Function
key
(code: KeyCode)
crates/tui/src/prompt_input.rs:233
↓ 36 callers
Method
register
Register a tool. Overwrites any existing tool with the same name.
crates/tools/src/registry.rs:24
↓ 33 callers
Method
get
(&self, name: &str)
crates/tools/src/registry.rs:37
↓ 31 callers
Method
is_empty
(&self)
crates/tui/src/prompt_input.rs:66
↓ 30 callers
Method
is_empty
(&self)
crates/query/src/tool_set.rs:64
↓ 24 callers
Function
dark
()
crates/tui/src/markdown_render.rs:204
↓ 23 callers
Method
register
Register a new command.
crates/commands/src/registry.rs:22
↓ 21 callers
Method
find
(&self, name: &str)
crates/tools/src/registry.rs:44
↓ 15 callers
Function
parse_sse_event
(event_type: &str, data: &str)
crates/api/src/streaming.rs:89
↓ 15 callers
Function
setup_registry
()
tests/integration/test_commands.rs:6
↓ 14 callers
Method
get
(&mut self, name: &str)
crates/mcp/src/manager.rs:57
↓ 14 callers
Method
handle_key
Process a key event.
crates/tui/src/permission_dialog.rs:54
↓ 14 callers
Function
key
(code: KeyCode)
crates/tui/src/permission_dialog.rs:176
↓ 14 callers
Method
next
Receive the next event, or `None` if the channel closed.
crates/tui/src/event.rs:38
↓ 14 callers
Method
to_json
Serialize to a JSON string. # Errors Returns an error if serialization fails (unlikely for well-formed enums).
crates/bridge/src/messaging.rs:51
↓ 12 callers
Function
resolve_api_provider
Resolve the API provider from environment variables and stored credentials. Priority order: 1. `CLAUDE_CODE_USE_BEDROCK=1` -> Bedrock 2. `CLAUDE_CODE
crates/auth/src/providers.rs:48
↓ 11 callers
Method
all
(&self)
crates/tools/src/registry.rs:51
↓ 10 callers
Function
home_dir
()
crates/utils/src/platform.rs:28
↓ 10 callers
Function
make_engine
()
crates/query/src/engine.rs:204
↓ 10 callers
Function
setup_full_registry
()
tests/integration/test_tools.rs:9
↓ 9 callers
Function
apply_edit
Replace `old_string` with `new_string` inside `content`. `old_string` must appear exactly once; otherwise returns `EditError`.
crates/utils/src/diff.rs:35
↓ 9 callers
Function
registry_with_dummy
()
crates/commands/src/registry.rs:111
↓ 8 callers
Method
build_request_info
Build the URL and headers for the request based on the provider.
crates/api/src/client.rs:77
↓ 8 callers
Method
call
(&self, _input: Value, _ctx: &mut ToolUseContext)
crates/tools/src/lsp.rs:32
↓ 8 callers
Function
render_markdown
(text: &str, theme: &Theme)
crates/tui/src/markdown_render.rs:13
↓ 7 callers
Function
char_count
(s: &str)
crates/tui/src/prompt_input.rs:24
↓ 7 callers
Function
execute_shell
Execute a shell command asynchronously, with optional timeout.
crates/utils/src/shell.rs:31
↓ 7 callers
Function
normalize_messages
(messages: &[Message])
crates/api/src/normalize.rs:12
↓ 7 callers
Method
process_user_input
Process user input: dispatch slash commands or run a query.
crates/query/src/engine.rs:108
↓ 6 callers
Function
build_system_prompt
(config: &AppConfig, cwd: &Path, tool_names: &[String])
crates/query/src/system_prompt.rs:11
↓ 6 callers
Function
create_default_registry
()
crates/tools/src/lib.rs:99
↓ 6 callers
Function
make_client
(provider: ApiProvider)
crates/api/src/client.rs:168
↓ 6 callers
Method
render_unified
(&self, theme: &Theme)
crates/tui/src/diff_view.rs:88
↓ 6 callers
Function
run_cli
Run the CLI with given args and return (stdout, stderr, success).
tests/integration/test_cli.rs:9
↓ 6 callers
Function
task_manager
()
crates/tools/src/shared/mod.rs:13
↓ 6 callers
Method
total_cost_usd
Estimate total cost in USD based on model pricing. Pricing (per million tokens) as of 2025: - claude-sonnet-4: input $3, output $15, cache-read $0.30
crates/services/src/cost.rs:33
↓ 5 callers
Method
call
(&self, input: Value, ctx: &mut ToolUseContext)
crates/tools/src/file_read.rs:58
↓ 5 callers
Method
call
(&self, input: Value, ctx: &mut ToolUseContext)
crates/tools/src/file_edit.rs:53
↓ 5 callers
Method
call
(&self, input: Value, ctx: &mut ToolUseContext)
crates/tools/src/file_write.rs:54
↓ 5 callers
Method
call
Low-level RPC helper: send request, receive response, extract `.result`.
crates/mcp/src/client.rs:127
↓ 5 callers
Function
compact_messages
(messages: &[Message], config: &CompactConfig)
crates/query/src/compact.rs:61
↓ 5 callers
Function
create_task
(description: &str)
crates/tools/src/shared/mod.rs:62
↓ 5 callers
Function
create_test_engine
Create a fully wired [`QueryEngine`] pointing at the mock server.
tests/integration/helpers/mod.rs:20
↓ 5 callers
Function
create_tool_context
Create a [`ToolUseContext`] for testing tools against a temporary directory.
tests/integration/helpers/mod.rs:47
↓ 5 callers
Function
ctx
(dir: &TempDir)
crates/tools/src/file_read.rs:103
↓ 5 callers
Function
ctx
(dir: &TempDir)
crates/tools/src/file_edit.rs:80
↓ 5 callers
Function
ctx
(dir: &TempDir)
crates/tools/src/file_write.rs:96
↓ 5 callers
Function
decode_jwt_claims
Decode the payload (claims) section of a JWT **without** verifying the signature. This is useful for extracting metadata such as `exp` or `sub`. # E
crates/bridge/src/auth.rs:36
↓ 5 callers
Function
estimate_messages_tokens
(messages: &[Message])
crates/query/src/compact.rs:27
↓ 5 callers
Method
handle_key
Handle a key event. Returns `true` when the user presses Enter to submit the key.
crates/tui/src/onboarding.rs:39
↓ 5 callers
Function
key
(code: KeyCode)
crates/tui/src/onboarding.rs:131
↓ 5 callers
Function
render_inline
Parse inline Markdown (`**bold**`, `*italic*`, `` `code` ``) and return a `Vec<Span>`.
crates/tui/src/markdown_render.rs:119
↓ 5 callers
Function
sessions_dir
()
crates/services/src/session.rs:21
↓ 4 callers
Function
atomic_write
Write `content` atomically: write to a temporary sibling file, then rename.
crates/utils/src/fs.rs:30
↓ 4 callers
Method
call
(&self, input: Value, ctx: &mut ToolUseContext)
crates/tools/src/glob.rs:56
↓ 4 callers
Method
call
(&self, input: Value, ctx: &mut ToolUseContext)
crates/tools/src/bash.rs:113
↓ 4 callers
Function
char_to_byte_index
(s: &str, char_idx: usize)
crates/tui/src/prompt_input.rs:15
↓ 4 callers
Function
consume_stream
Consume a stream of `StreamEvent`s, collecting block accumulators.
crates/query/src/query_loop.rs:152
↓ 4 callers
Function
ctx
(dir: &TempDir)
crates/tools/src/glob.rs:106
↓ 4 callers
Function
generate_summary
Generate a text summary from a list of old messages.
crates/query/src/compact.rs:79
↓ 4 callers
Function
git
Run a git command in `cwd` and return stdout on success.
crates/utils/src/git.rs:8
↓ 4 callers
Function
pad_to_width
Pad (or truncate) `s` to exactly `width` display columns, respecting Unicode character widths.
crates/tui/src/diff_view.rs:184
↓ 4 callers
Function
read_file_in_range
Read lines `start..=end` from `path` (1-indexed, inclusive).
crates/utils/src/fs.rs:17
↓ 4 callers
Function
resolve_path
(base: &Path, rel: &str)
crates/utils/src/fs.rs:53
↓ 4 callers
Method
scroll_up
(&mut self, amount: u16)
crates/tui/src/message_view.rs:95
↓ 4 callers
Method
spawn
Spawn an MCP server process and prepare the transport.
crates/mcp/src/transport.rs:24
↓ 4 callers
Function
strip_html_tags
Strip HTML tags, script/style content, and normalize whitespace.
crates/tools/src/web_fetch.rs:156
↓ 4 callers
Method
submit
Clear the buffer, push non-empty text into history, and return the submitted text.
crates/tui/src/prompt_input.rs:175
↓ 4 callers
Function
test_ctx
()
crates/tools/src/bash.rs:171
↓ 4 callers
Method
text
(&self)
crates/tui/src/prompt_input.rs:59
↓ 4 callers
Method
tick
(&mut self)
crates/tui/src/app.rs:82
↓ 4 callers
Method
to_api_schemas
(&self)
crates/tools/src/registry.rs:63
↓ 4 callers
Method
track
Record an event.
crates/services/src/analytics.rs:42
↓ 4 callers
Function
with_retry
Execute a fallible async operation with retries. Only retries on errors where [`ApiError::is_retryable`] returns `true`. Uses exponential backoff wit
crates/api/src/retry.rs:33
↓ 3 callers
Method
add_usage
Accumulate usage from an API response.
crates/services/src/cost.rs:20
↓ 3 callers
Function
build_search_command
Build the search command string, preferring rg.
crates/tools/src/grep.rs:101
↓ 3 callers
Function
data_dir
()
crates/utils/src/platform.rs:34
↓ 3 callers
Method
execute
(&self, _args: &str, _ctx: &mut CommandContext)
crates/commands/src/registry.rs:106
↓ 3 callers
Function
generate_code_verifier
Generate a random PKCE code verifier (43-128 chars from unreserved set).
crates/auth/src/oauth.rs:154
↓ 3 callers
Function
get_api_key
()
crates/auth/src/api_key.rs:28
↓ 3 callers
Function
load_api_key
Load an API key from the system keychain. Returns `None` if not found.
crates/auth/src/keychain.rs:21
↓ 3 callers
Function
load_config
(path: &std::path::Path)
crates/tools/src/config_tool.rs:109
↓ 3 callers
Method
names
(&self)
crates/tools/src/registry.rs:57
↓ 3 callers
Function
register_builtins
Register all built-in commands into the given registry.
crates/commands/src/builtin/mod.rs:29
↓ 3 callers
Function
register_p0_tools
Register P0 tools (Bash, Grep) — core execution.
crates/tools/src/lib.rs:45
↓ 3 callers
Function
register_p0b_tools
Register P0b tools (FileRead, FileWrite, FileEdit, Glob) — file operations (dev4).
crates/tools/src/lib.rs:51
↓ 3 callers
Function
restore
Restore the terminal to its original state (reverse of [`init`]).
crates/tui/src/terminal.rs:27
↓ 3 callers
Method
scroll_down
(&mut self, amount: u16)
crates/tui/src/message_view.rs:102
↓ 3 callers
Method
send_message
Send a [`BridgeMessage`] as a text frame.
crates/bridge/src/websocket.rs:41
↓ 3 callers
Function
setup
Build all services from CLI arguments. This performs authentication, creates the API client, tool & command registries, and wires everything into a [
crates/cli/src/setup.rs:27
↓ 3 callers
Function
shift_key
(code: KeyCode)
crates/tui/src/prompt_input.rs:242
↓ 3 callers
Method
text
(s: impl Into<String>)
crates/core/src/tool.rs:23
↓ 3 callers
Function
tokens_path
()
crates/auth/src/oauth.rs:211
↓ 3 callers
Function
unified_diff
(old: &str, new: &str, filename: &str)
crates/utils/src/diff.rs:18
↓ 2 callers
Method
add_tokens
(&self, input: u64, output: u64)
crates/core/src/state.rs:82
↓ 2 callers
Method
append_streaming
Append partial text to the active stream.
crates/tui/src/message_view.rs:77
↓ 2 callers
Method
authorization_url
(&self, scope: &str)
crates/auth/src/oauth.rs:51
next →
1–100 of 1,121, ranked by callers