Join us and get access to thousands of tutorials and a community of expert Pythonistas.
This lesson is for members only. Join us and get access to thousands of tutorials and a community of expert Pythonistas.
Examining Terminal Agents
00:00 Terminal agents run in your shell. You describe a task and the agent reads files, proposes edits, and runs commands. The standout feature here is the approval model.
00:12 You generally approve or reject each step before the agent moves on. That gives you high control while still letting the agent handle the heavy lifting. The terminal workflow excels in two situations.
00:25 The first one is complex multi-file changes. You can point the agent at your whole project and let it trace through imports, find related files, and propose coordinated changes across many modules at once.
00:39 The second one is getting up to speed on a new codebase. When you’re jumping into unfamiliar code, a terminal agent can help you understand what’s there before you start making changes.
00:52 Tools in this category include Claude Code, Aider, OpenCode, and Codex CLI. Because they run in the shell, they fit naturally into your existing workflow.
01:02 You can pipe logs into them, chain them with other CLI tools, and run them inside automation scripts. Now let’s see Claude Code in action. This is the command line.
01:14
Here you can use the ls command to show that the directory is completely empty.
01:22 Then you can ask Claude Code to create a Python password generator CLI and to add a separate module for password generation and also some tests. Notice that Claude isn’t simply generating a code snippet.
01:38 It’s reasoning through the task, deciding which files to create, writing implementation, and organizing the project into multiple components. Claude asks for confirmation before making changes, so you remain in control of the project.
01:53 If you want longer sessions with fewer interruptions, many terminal agents offer an auto mode that reduces how often they pause for approval. And if your code needs to stay local, several terminal agents can connect to models running on your own machine through tools like Ollama.
02:20 After some minutes, Claude Code created the password generation logic and a test suite, all from a single prompt. Now you can ask it, how can you use this?
02:32 So it explains how to use the code that it generated. But before running this command, let’s go back to explore what it created. The folder is no longer empty.
02:45
Claude Code generated all of this code. We can see what’s inside password_generator, and what’s inside the tests folder.
02:57
Instead of one large file, it organized the project into separate modules, which makes the code easier to maintain and test. In the cli.py file, we have the command-line interface for the password generator.
03:11
In generator.py, it has all the logic for how to generate the password, and then we have tests for both files. Now let’s run the code that it generated.
03:23 So we have a password generator. Now that you’ve seen Claude Code in action, next up, you’re going to learn about pull request agents.
Become a Member to join the conversation.