<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Exploring Agentforce</title>
    <description>The latest articles on DEV Community by Exploring Agentforce (@exploring_agentforce).</description>
    <link>https://dev.to/exploring_agentforce</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3961233%2F6a49a1b5-2ebe-4fac-89d9-748c0ce2abc0.png</url>
      <title>DEV Community: Exploring Agentforce</title>
      <link>https://dev.to/exploring_agentforce</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/exploring_agentforce"/>
    <language>en</language>
    <item>
      <title>How to Connect a Trailhead Org to Salesforce CLI</title>
      <dc:creator>Exploring Agentforce</dc:creator>
      <pubDate>Sun, 31 May 2026 14:45:05 +0000</pubDate>
      <link>https://dev.to/exploring_agentforce/how-to-connect-trailhead-org-to-salesforce-cli-2o07</link>
      <guid>https://dev.to/exploring_agentforce/how-to-connect-trailhead-org-to-salesforce-cli-2o07</guid>
      <description>&lt;h2&gt;
  
  
  Take Trailhead Learning beyond the browser
&lt;/h2&gt;

&lt;p&gt;Salesforce &lt;strong&gt;Trailhead&lt;/strong&gt; is a great way to learn &lt;strong&gt;Agentforce&lt;/strong&gt;. You can &lt;strong&gt;level up this experience&lt;/strong&gt; by connecting your Trailhead org to Salesforce CLI and working with AgentScript metadata locally in VS Code. Here’s a &lt;strong&gt;quick setup&lt;/strong&gt; flow for connecting a Trailhead Agentforce org to Salesforce CLI 👇&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prerequisites&lt;/strong&gt;:&lt;br&gt;
• VS Code&lt;br&gt;
• Salesforce CLI installed&lt;br&gt;
• Trailhead org with Agentforce enabled&lt;/p&gt;
&lt;h4&gt;
  
  
  Step 1. Open your Trailhead org
&lt;/h4&gt;

&lt;p&gt;Launch the Trailhead playground or developer org that you want to connect.&lt;/p&gt;
&lt;h4&gt;
  
  
  Step 2. Find your username
&lt;/h4&gt;

&lt;p&gt;Profile → Settings&lt;/p&gt;
&lt;h4&gt;
  
  
  Step 3. Set password (if not set already)
&lt;/h4&gt;

&lt;p&gt;Settings → Change My Password&lt;/p&gt;
&lt;h4&gt;
  
  
  Step 4. Connect org via CLI
&lt;/h4&gt;

&lt;p&gt;Authenticate via browser, setting up alias for the org and providing your Trailhead org url:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;
&lt;span class="c"&gt;# Authenticate with your Trailhead org&lt;/span&gt;

sf org login web &lt;span class="nt"&gt;--alias&lt;/span&gt; your-org-alias &lt;span class="nt"&gt;--instance-url&lt;/span&gt; https://your-org-name.develop.my.salesforce.com

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Step 5. Verify connection
&lt;/h4&gt;

&lt;p&gt;Confirm that the org was added successfully:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;
sf org list

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Step 6. Set the default org
&lt;/h4&gt;

&lt;p&gt;To avoid specifying the org in every command, set it as the default target:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;
sf config &lt;span class="nb"&gt;set &lt;/span&gt;target-org your-org-alias

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Important&lt;/strong&gt;: Use the Correct Login URL&lt;/p&gt;

&lt;p&gt;Trailhead org URLs used for login usually look like:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;https://your-org-name.develop.my.salesforce.com&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NOT&lt;/strong&gt;:&lt;br&gt;
• &lt;code&gt;login.salesforce.com&lt;/code&gt;&lt;br&gt;
• &lt;code&gt;develop.lightning.force.com&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Once connected, you can &lt;strong&gt;retrieve AgentScript metadata&lt;/strong&gt; locally in VS Code, experiment faster, and work with Agentforce in a more &lt;strong&gt;development-oriented workflow&lt;/strong&gt;.&lt;/p&gt;

</description>
      <category>agentforce</category>
      <category>trailhead</category>
      <category>sfdx</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
