Skip to content

salesforcecli/sfcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Agentforce Vibes CLI

Agentforce Vibes CLI Screenshot

This is an issue-only repository for the Agentforce Vibes CLI (sfcode). We monitor this repo for feedback from the community.

If you have a feature or enhancement request, first review the existing discussions to see if someone has already requested it. If you don't see your feature or enhancement, click the New discussion button to create a new request.

Similarly, if you've encountered a bug with the Agentforce Vibes CLI, check out the existing issues to see if it's already been reported. If you don’t see your bug listed, click the New issue button to create one.

NOTICE: GitHub is not a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, use official Salesforce customer support channels.

πŸš€ Why Agentforce Vibes CLI?

  • 🧠 Powered by Salesforce LLM Gateway: Access trusted and powerful generative Salesforce Fluent Reasoning models.
  • πŸ”§ Built-in tools: File operations, shell commands, web fetching, and more.
  • πŸ”Œ Extensible: MCP (Model Context Protocol) support for custom integrations.
  • ⚑ Includes Salesforce DX MCP Server: Comes bundled with powerful tools for Salesforce development, including Aura-to-LWC migration, LWC component generation, code analysis, and mobile development utilities.
  • πŸ’» Terminal-first: Designed for developers who live in the command line.
  • πŸ›‘οΈ Open source: Apache 2.0 licensed.

πŸ” Authentication

Agentforce Vibes CLI uses your Salesforce Developer Edition org credentials to connect to the Salesforce LLM Gateway.

You can provide your org's username or alias in two ways:

Option 1: Command-line flag (Recommended)

Pass the --gateway-org flag when you run sfcode:

sfcode --gateway-org your_username_or_alias

Option 2: Environment variable

Set the SFCODE_GATEWAY_ORG environment variable in your shell configuration file (e.g., .zshrc, .bashrc):

export SFCODE_GATEWAY_ORG="your_username_or_alias"

Then you can run sfcode from any directory:

sfcode

πŸš€ Getting Started

Basic Usage

Start in current directory

sfcode --gateway-org your_username_or_alias

Include multiple directories

sfcode --gateway-org your_username_or_alias --include-directories ../lib,../docs

Non-interactive mode for scripts

Get a simple text response:

sfcode -p "Explain the architecture of this codebase" --gateway-org your_username_or_alias

For more advanced scripting, including how to parse JSON and handle errors, use the --output-format json flag to get structured output:

sfcode -p "Explain the architecture of this codebase" --output-format json --gateway-org your_username_or_alias

Quick Examples

Start a new project

cd new-project/
sfcode --gateway-org your_username_or_alias > Write me an LWC component that displays a list of accounts.

Analyze existing code

git clone https://github.com/salesforcecli/sfcode
cd sfcode
sfcode --gateway-org your_username_or_alias > Give me a summary of all of the changes that went in yesterday

Included Tools: Salesforce DX MCP Server

Agentforce Vibes CLI comes bundled with the Salesforce DX MCP Server, providing a powerful suite of tools tailored for Salesforce development right out of the box. These tools can help you with a variety of tasks, from modernizing old codebases to building new components with best practices.

You can start using these tools by invoking them with @mcp. For example:

> @mcp run_apex_test

Here are some of the available toolsets:

  • Orgs: Tools for performing org operations, including creating and deleting scratch orgs.
  • Metadata: Tools for performing metadata operations, including deploying and retrieving metadata.
  • Data: Tools for performing data operations, including querying and updating data.
  • Aura Experts: Tools for migrating Aura components to Lightning Web Components (LWC), including creating and enhancing migration blueprints.
  • LWC Experts: A comprehensive set of tools for LWC development. Create components, generate Jest tests, get guidance on best practices, accessibility, and security.
  • Code-Analyzer: Perform static analysis on your code to check for best practices, security vulnerabilities, and performance issues.
  • Mobile Toolsets: Utilities for building mobile Lightning Web Components, with support for features like barcode scanning, biometrics, and NFC.

To see all available tools, you can run:

> /mcp list

πŸ“š Documentation

Getting Started

Core Features

Tools & Extensions

Advanced Topics

Configuration & Customization

Troubleshooting & Support

  • Troubleshooting Guide - Common issues and solutions
  • Use /bug command to report issues directly from the CLI

Using MCP Servers

Configure MCP servers in ~/.sfcode/settings.json to extend Agentforce Vibes CLI with custom tools:

> @github List my open pull requests
> @slack Send a summary of today's commits to #dev channel
> @database Run a query to find inactive users

See the MCP Server Integration guide for setup instructions.

🀝 Contributing

We welcome contributions! Agentforce Vibes CLI is fully open source (Apache 2.0), and we encourage the community to:

  • Report bugs and suggest features
  • Improve documentation
  • Submit code improvements
  • Share your MCP servers and extensions

See our Contributing Guide for development setup, coding standards, and how to submit pull requests.

Run Locally

git clone https://github.com/salesforcecli/sfcode.git
cd sfcode
npm install
npm run build

Set the SFCODE_GATEWAY_ORG in your environment:

export SFCODE_GATEWAY_ORG="your_username_here"

Finally, run Agentforce Vibes CLI from the project root:

node ./scripts/start.js

πŸ“– Resources

Uninstall

See the Uninstall Guide for removal instructions.

πŸ“„ Legal


Built with ❀️ by Salesforce and the open source community


About

Issue only repo for Codey

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •