Share your feedback on the upcoming Cody CLI Beta

Hi all! We’re working on launching a cody cli tool as Beta. This is a new iteration of the previous cody-agent experimental-cli tool that was launched in April here.

To get started with the new cody tool:

npm install -g @sourcegraph/cody # Note: no longer `cody-agent`

# Authenticate with Sourcegraph by opening a browser window
cody auth login --web

# Ask Cody a question (with no context):
cody chat -m 'what color is the sky?'

# Ask Cody a question (with Sourcegraph Enterprise repository context):
cody chat --context-repo github.com/sourcegraph/{sourcegraph,cody} --show-context -m 'how is authentication handled in sourcegraph/cody?'

Please share your feedback in this thread :slight_smile:

I posted this a bit too early since I haven’t published the @sourcegraph/cody npm package yet. I wanted to share a link to this post in our docs. Right now, you need to install @sourcegraph/cody-agent and run cody-agent instead of just cody. Otherwise, it’s the same cody auth and cody chat experience.

@olafurpg
It appears that context is broken with the latest update. Please see the snippet below

>> cody-agent chat --context-repo xyz.url/repo --show-context -m 'explain what is happening in main.py?'
⠋ Loading access token(node:77774) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
> Context items:



Unfortunately, without the `main.py` file, I cannot provide an explanation of what is happening in it. Could you please provide the contents of the `main.py` file, or at least a brief description of what it is supposed to do? With that information, I can better analyze and explain what is happening in the code.

As shown in the snippet, referencing to a repo for context does not work and no context is shown.

I have already logged in

>> cody-agent auth login --web
⠋ Logging in...(node:84368) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
✔ You are already logged in as <USER>
  1. Am I using the cli correctly?

  2. Also, Is there an ETA for publishing the npm package?

Thank you for reporting! I am able to reproduce the issue with --context-repo. It was working not too long ago so it must be something small that broke.

I tried to release the @sourcegraph/cody npm package on Friday but the CI job failed because this package doesn’t exist yet. It was unfortunate timing since I’m OOO this week so I won’t be able to fix the release (and --context-repo) until next week.

I’ll post back again once I have a new update :slight_smile: Sorry for the inconvenience!

1 Like