A Text-Based Browser using Requests, Beautiful Soup, Sys, OS, and colorama
Use argparse

Argparse will give you cleaner code and a friendlier CLI. It will simplify much of this blob:

dir_name = ''
if len(sys.argv) == 2:
    dir_name = sys.argv[1]
    if not os.path.exists(dir_name):
        os.mkdir(dir_name)
path = dir_name + '/' if dir_name else ''


Also, for path handling and directory creation consider the use of pathlib.Path.

write_path

You're passing an URL into what you've called the file parameter, so that's confusing. Also, it appears that you're manually parsing that URL using split when you're better off using urllib.parse.

Ternary

This:

_ = text_list.append(txt + '\n') if len(txt) &gt; 2 and not txt.startswith(('$', '.', '@')) else 0


should be expanded out into a plain if:

if len(txt) &gt; 2 and not txt.startswith(('$', '.', '@')):
    text_list.append(txt + '\n')


Similarly, this:

    _ = [print(line, end='') for line in content]


is doing a comprehension and throwing away the result. Instead,

print(''.join(content))


Error handling

response = requests.get(page, headers={'user-agent': 'Mozilla/5.0'}, timeout=5)
if not response:
    raise Exception


First, never raise a base Exception - you want to raise something more specific. That said, in this case, replace your if with a response.raise_for_status().

In a similar case,

if '.' not in url:
    raise Exception


should instead be raising something like ValueError(f'Malformed URL {url}'). It's also odd that this is referring to the global url variable instead of the page argument. Finally: to do this kind of validation (not sure why it matters that there's a dot in the URL), you should be using urllib.parse.

Global code

Pull everything from history_stack = [] onwards into one or more functions.