We present a fabrication method of superconducting quantum interference devices (SQUIDs) based on direct write lithography with an Atomic Force Microscope (AFM). This technique involves maskless local anodization of Nb or NbN ultrathin films using the voltage biased tip of the AFM. The SQUIDs are of weak-link type, for which two geometries have been tested: Dayem and variable thickness nanobridges. The magnetic field dependence of the maximum supercurrent Ic(flux) in resulting SQUIDs is thoroughly measured for different weak link geometries and for both tested materials. It is found that the modulation shape and depth of Ic(flux) curves are greatly dependent on the weak link size. We analyze the results taking into account the kinetic inductance of nanobridges and using the Likharev-Yakobson model. Finally we show that the present resolution reached by this technique (20nm) enables us to fabricate Nb weak-links which behavior approaches those of ideal Josephson junctions.