Sourcegraph DocsSourcegraph Docs
  • Code Intelligence

    • Cody
    • Code Search
  • Code Management

    • Batch Changes
    • Code Navigation
    • Code Monitoring
    • Code Ownership
    • Code Insights
    • Notebooks
  • Platform

    • Sourcegraph Admin
    • Sourcegraph Cloud
    • Integrations
    • Development
  • CLI & API

    • Sourcegraph CLI
    • Sourcegraph GraphQL API
    • Sourcegraph Stream API
  • Help & Support

    • SLAs & Premium Support
    • Tutorials
    • Sourcegraph Accounts
    • Changelog
  1. Docs
  2. cli
  3. references
  4. users
  5. tag

src users tag

Flags

NameDescriptionDefault Value
-dump-requestsLog GraphQL requests and responses to stdoutfalse
-get-curlPrint the curl command for executing this query and exit (WARNING: includes printing your access token!)false
-insecure-skip-verifySkip validation of TLS certificates against trusted chainsfalse
-removeRemove the tag. (default: add the tagfalse
-tagThe tag to set on the user. (required)
-traceLog the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracingfalse
-user-agent-telemetryInclude the operating system and architecture in the User-Agent sent with requests to Sourcegraphtrue
-user-idThe ID of the user to tag. (required)

Usage

Usage of 'src users tag':
  -dump-requests
    	Log GraphQL requests and responses to stdout
  -get-curl
    	Print the curl command for executing this query and exit (WARNING: includes printing your access token!)
  -insecure-skip-verify
    	Skip validation of TLS certificates against trusted chains
  -remove
    	Remove the tag. (default: add the tag
  -tag string
    	The tag to set on the user. (required)
  -trace
    	Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing
  -user-agent-telemetry
    	Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph (default true)
  -user-id string
    	The ID of the user to tag. (required)

Examples:

  Add a tag "foo" to a user:

    	$ src users tag -user-id=$(src users get -f '{{.ID}}' -username=alice) -tag=foo

  Remove a tag "foo" to a user:

    	$ src users tag -user-id=$(src users get -f '{{.ID}}' -username=alice) -remove -tag=foo

Related examples:

  List all users with the "foo" tag:

    	$ src users list -tag=foo


On this page

  1. `src users tag`

    1. Flags
    1. Usage