Dependencies & Package Managers
When building stuff, you’re not writing every piece of code from scratch. You’re using code that other people have already written. These are called dependencies, packages, or libraries, kind of used interchangeably. If you want to connect to a database, there are many packages for that. If you want to send emails, there are packages for that. You just install them and use them.
And the thing that manages all of these is called a package manager. If you’re working with JavaScript, which is what most web stuff uses, you’ve got npm (Package manager for JavaScript/Node.js. Install dependencies with ‘npm install’.), which stands for Node (Node (or Node.js) is a tool that lets you run JavaScript code outside of a web browser, typically on servers.) Package Manager. There’s also Bun, which is a newer, faster alternative that’s getting popular. Does the same thing, just quicker. If you’re working with Python, you’ve got pip. There are others, but those are the main ones you’ll see.
So when you clone a repo and want to run it, the first thing an agent will do is npm install or pip install.
It looks at a file in the project, package.json (Simple text format for storing and exchanging data. It uses key-value pairs and is easy for both humans and computers to read.) for JavaScript or requirements.txt for Python, and it downloads all the packages that project needs. They go into a folder called node_modules for JavaScript, and you’ll notice that folder is massive. Like, thousands of files. That’s normal. Don’t worry about it. Don’t touch it. It’s just all the packages you need.
The coding agent does this automatically most of the time. When it needs a new package, it’ll install it.