Skip to main content

InitArgs

Struct InitArgs 

Source
pub struct InitArgs {
    pub server_url: Option<String>,
    pub claude_settings: Option<ClaudeSettingsTarget>,
    pub no_gitignore: bool,
    pub no_user_context: bool,
    pub user_context: Option<String>,
    pub global: bool,
    pub agent: Agent,
    pub claude_telemetry: bool,
    pub no_claude_telemetry: bool,
    pub workspace: bool,
    pub project: Option<String>,
}
Expand description

Arguments of init.

Fields§

§server_url: Option<String>

Visdom server URL for repo registration

§claude_settings: Option<ClaudeSettingsTarget>

Where to install Claude Code hooks: shared (.claude/settings.json, typically committed) or local (.claude/settings.local.json, personal/git-ignored). When omitted, prompts interactively if stdin is a TTY, otherwise defaults to shared.

§no_gitignore: bool

Skip updating .gitignore. Use this when your project manages .gitignore separately or you want to commit the Claude settings files.

§no_user_context: bool

Disable the cross-repo user-level context for this project. Also applies to --global, where it disables the user-level context instead of the per-repo one.

§user_context: Option<String>

Enable the user-level context and read it from this explicit path (conflicts with –no-user-context). Also applies to --global, where it sets the path the user-level context is read from.

§global: bool

Install Visdom once for ALL sessions of the chosen –agent on this machine, instead of initializing the current repo: Claude Code hooks into ~/.claude/ (settings.json + CLAUDE.md), Codex hooks into /.codex/ (hooks.json + AGENTS.md), the GSD extension via gsd install (global), the OpenCode plugin into the user config dir’s opencode/plugins/, or the Amp plugin into $XDG_CONFIG_HOME/amp/plugins/ (/.config/amp/plugins/ when unset). Does not require git. Also writes a user-level context config (honoring –no-user-context / –user-context). Conflicts with the per-repo-only flags –server-url, –claude-settings and –no-gitignore.

§agent: Agent

Which agent to install hooks for. The default installs Claude Code hooks (.claude/settings.json or settings.local.json); codex writes .codex/hooks.json; gsd (alias gsd2) registers the GSD extension with gsd install -l; opencode writes a plugin under .opencode/plugins/; amp writes a plugin under .amp/plugins/. With –global, the user-level equivalents instead.

§claude_telemetry: bool

Export Claude Code’s own per-request cost to Visdom over OpenTelemetry (the default): writes the OTel log exporter settings and an otelHeadersHelper (the otel-headers command) into the USER-level ~/.claude/settings.json, per-repo or with –global. An existing exporter setup is left untouched (collector instructions are printed instead). Without either flag, an interactive init asks (default yes), and a non-interactive one enables it unless you opted out before.

§no_claude_telemetry: bool

Opt out of Claude Code telemetry: removes Visdom’s entries from ~/.claude/settings.json and records the choice, so neither a later init nor a CLI upgrade turns it back on.

§workspace: bool

Bind this directory to one project, for every session started under it (an umbrella folder of checkouts, for example): resolves –project once on the server and writes its id to .visdom/tracing.toml here (created if missing). Works outside git; installs no hooks (use –global for those) and binds no repo.

§project: Option<String>

The project name for –workspace.

Trait Implementations§

Source§

impl Args for InitArgs

Source§

fn group_id() -> Option<Id>

Report the ArgGroup::id for this set of arguments
Source§

fn augment_args<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_args_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

impl Clone for InitArgs

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl FromArgMatches for InitArgs

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more